module.exports={
  app_keys:['my first koa Project'],
  session_config : {
  key:'koa:sess',//cookie的key
  maxAge:400000,//cookie保存的时间
  autoCommit:true,
  overwrite:true,
  httpOnly:true,
  signed:true,
  rolling:false,
  renew:false,
},
mysql_config:{
  database:'koapro',
  user:'root',
  password:'zxcvbnm123'
},
sequelize_config:{
  host:'127.0.0.1',
  dialect:'mysql',
  port:'3306',
  dialectOptions:{
    charset:'utf8mb4',
    collate:'utf8mb4_0900_ai_ci',
    supportBigNumbers:true,
    bigNumberStrings:true
  },
  pool:{
    max:5,
    min:0,
    acquire:30000,
    idle:10000
  },
  define:{
    freezeTableName:true,
    timestamps:false,
    paranoid:false,
    operatorsAliases:false
  },
  timezone:'+08:00'
},
jwt_config:{
  
  secretKey:'my-koaproject-token',
  tokenExpiresTime:'2h'
},
cors_config:{
  origin:function(ctx){
   if(ctx.header.referer){
      const whiteList = ['http://127.0.0.1:8080','http://192.168.1.4:8080'];
      let url = ctx.header.referer.substr(0,ctx.header.referer.length -1);
      if(whiteList.includes(url)){
         return url
      }
      return 'http://localhost:8080';
    }else{
      return '*';
    }
   },
  maxAge:5,
  Credentials:true,
  allowMethods:['GET','POST','PUT','DELETE','OPTIONS'],
  allowHeaders:['Content-Type','AUthorization','Accept'],
  exposeHeaders:['WWW-Authenticate','Server_Authorization']
},
searchPageSize:2
}